import React from 'react'
import './index.css'
import Item from '../Item'

export default function List({list, deleteItem, changeDone}) {

	return (
		<div className='list'>
			<ul>
				{list.map(item => 
					<li key={item.id}>
						<Item item={ item} deleteItem={deleteItem} changeDone={changeDone} />
					</li>
				)}
			</ul>
		</div>
	)
}
